<?php
$this->pageTitle = '发布文章';
$this->breadcrumbs = array(
	'商品文章列表' => array('publis/index'),
	'发布文章'
);
?>
<div class="goods_header end_header"><h3>发布文章</h3></div>
<div class="form" style="border:1px solid #d7d7d7;border-top:none;padding:10px;">
		<?php $form=$this->beginWidget('CActiveForm', array(
			'id'=>'articleform',
			'enableAjaxValidation'=>true,
			'enableClientValidation'=>true,
			'clientOptions'=>array(
				'validateOnSubmit'=>true,
            ),
		)); ?>
			<p class="inputWp">
				<?php echo $form->labelEx($formModel,'title'); ?>
				<?php echo $form->textField($formModel,'title',array('maxlength'=>100)); ?>
				<?php echo $form->error($formModel,'title'); ?>
			</p>
			<p class="inputWp">
				<?php echo $form->labelEx($formModel,'shorttitle'); ?>
				<?php echo $form->textField($formModel,'shorttitle',array('maxlength'=>80)); ?>
				<?php echo $form->error($formModel,'shorttitle'); ?>
			</p>
			<p class="inputWp">
				<?php echo $form->labelEx($formModel,'keywords'); ?>
				<?php $this->widget('CAutoComplete', array(
					'model'=>$formModel,
					'attribute'=>'keywords',
					'url'=>array('suggestTags'),
					'multiple'=>true,
					'htmlOptions'=>array('size'=>30),
				)); ?>
				<?php echo $form->error($formModel,'keywords'); ?>
			</p>
            <p class="inputWp">
				<?php echo $form->labelEx($formModel,'typeid');?>
				<?php echo $form->DropDownList($formModel,'typeid',CHtml::listData(Arctype::model()->findAll(),'id','typename'));?>
			</p>
			<div><?php echo $form->labelEx($formModel,'description');?>
				<?php
				$this->widget('ext.dxheditor.DxhEditor',array(
					'model'=>$formModel,
					'attribute' => 'description',
					'htmlOptions' => array('style'=>'width:100%;height:100px;'),
                                        'options' =>array('tools'=>'full'),
				));?>
				<?php echo $form->error($formModel,'description'); ?>
			</div>
			<div><?php echo $form->labelEx($addonarticle,'body');?>
				<?php
				$this->widget('ext.dxheditor.DxhEditor',array(
					'model'=>$addonarticle,
					'attribute' => 'body',
					'htmlOptions' => array('style'=>'width:100%;height:600px;'),
                                        'options' =>array('tools'=>'full'),
				));?>
			</div>
			<p class="inputWp">
				<?php echo $form->labelEx($formModel,'litpic'); ?>
				<?php echo $form->textField($formModel,'litpic',array('maxlength'=>100)); ?>
				<?php echo $form->error($formModel,'litpic'); ?>
			</p>
			<p class="inputWp">
				<?php echo $form->labelEx($formModel,'filename'); ?>
				<?php echo $form->textField($formModel,'filename',array('maxlength'=>80)); ?>
				<?php echo $form->error($formModel,'filename'); ?>
			</p>
			<p class="inputWp">
				<button type="submit">提交并发表文章</button>
			</p>
		<?php $this->endWidget(); ?>
</div><!-- form -->